package cn.mesmile.design.strategy;

/**
 * @author zb
 * @version 1.0
 * @date 2020/11/21 13:27
 * @description
 */
public class PromotionContext {

    private Strategy strategy;

    public PromotionContext(Strategy strategy){
        this.strategy = strategy;
    }

    /**
     *  执行策略
     * @param productOrder
     * @return
     */
    public double executeStrategy(ProductOrder productOrder){
        return strategy.computePrice(productOrder);
    }

}
